using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Andrewl.XnaHelpers.Audio
{
    public class StandardAudio
    {
        public List<StandardSoundManager> soundEffectManagers;

        public StandardSoundManager this[string name]
        {
            get
            {
                for (int i = 0; i < soundEffectManagers.Count; i++)
                {
                    if (name.Equals(soundEffectManagers[i].name))
                        return soundEffectManagers[i];
                }
                return null;
            }
        }

        public StandardAudio()
        {
            soundEffectManagers = new List<StandardSoundManager>();
        }

        public bool IsEmpty()
        {
            if (soundEffectManagers.Count == 0)
                return true;
            else
                return false;
        }

        public void Add(StandardSoundManager soundManagers)
        {
            soundEffectManagers.Add(soundManagers);
        }

        public void Remove(string name)
        {
            for (int i = 0; i < soundEffectManagers.Count; i++)
            {
                if (name.Equals(soundEffectManagers[i].name))
                {
                    soundEffectManagers.Remove(soundEffectManagers[i]);
                    return;
                }
            }
        }

        public void Remove(StandardSoundManager soundEffectManager)
        {
            soundEffectManagers.Remove(soundEffectManager);
        }


       
    }
}
